#include "threadPool.h"

int commandDivid(char* str,char* commandSave,char* commandPath1,char* commandPath2)
{
    char *p1;
    
    size_t len = strlen(str);
    char* str2 = (char*)malloc(len+1);
    strcpy(str2,str);
    str2[len] = '\0';
    p1 = strtok(str," ");
    strcpy(commandSave,p1);
    printf("commandSave = %s\n" ,commandSave);
    char *p;
    int i=1;
    while((p = strtok(NULL," ")) != NULL){
        //printf("p = %s\n" ,p);
        if(i==1)
        {
            strcpy(commandPath1,p);
            printf("commandPath1 = %s\n" ,commandPath1);
            i++;
        }
        else if(i==2)
        {
            strcpy(commandPath2,p);
            printf("commandPath2 = %s\n" ,commandPath2);
        }
    }

    return 0;
}